We can call ensure_icon_size() for an empty image; don't warn out in
that case, but just return a zero width.
self->priv->icon_size,
&width, &height))
{
- g_warning ("Invalid icon size %d\n", self->priv->icon_size);
- width = height = 24;
+ if (self->priv->icon_size == GTK_ICON_SIZE_INVALID)
+ {
+ width = height = 0;
+ }
+ else
+ {
+ g_warning ("Invalid icon size %d\n", self->priv->icon_size);
+ width = height = 24;
+ }
}
*width_out = width;